package defiant.common.tools;

import static defiant.common.tools.Logger.log;

import java.io.IOException;

public class StartBrowser {
	
	private StartBrowser() {
	}
	
	public static void openUrl(String url) {
		try {
			Runtime rt = Runtime.getRuntime();
			rt.exec(new String[] { "rundll32", "url.dll,FileProtocolHandler", url });
			
			//log("awesome idea");
			//throw new IOException();
		} catch (IOException ex) {
			//log("Failed to start browser: " + url, e);
			log(new Exception("Failed to start browser: " + url, ex));
		}
	}
}
